<admintpl file="header" />
<style>
    .ys1{
        width: 120px;height: 15px;border: 0 solid white;text-align: center
    }
    a{cursor: pointer;}
    .fl{float:left;}
    .c-pages{padding:20px 0; text-align: center;}
    .c-pages.tl{text-align: left;}
    .c-pages span{display: inline-block; margin-right: 5px; font-size:12px; height:28px; line-height: 28px;}
    .c-pages span.col{color: #fe344e; font-weight: 600;}
    .c-pages span a{display: inline-block; margin:0 3px; height:28px; line-height: 28px; text-align: center; padding:0 12px; border:1px solid #ccc; text-decoration: none; border-radius: 2px;}
    .c-pages span a:link,.c-pages span a:active,.c-pages span a:visited{color: #333;}
    .c-pages span a:hover{ color: #157efb; border: 1px solid #157efb;}
    .c-pages span a.active{color: #fff; background: #157efb; border:1px solid #157efb;}
    .c-pages  .current{ color: #fff; background: #157efb; border: 1px solid #157efb; display: inline-block; margin: 0 3px; height: 28px;
        line-height: 28px;
        text-align: center;
        padding: 0 12px;
        text-decoration: none;
        border-radius: 2px;
    }
    div{
        margin-bottom: 20px;
    }
    .txt{
        margin-right: 100px;
    }

    .addWei{background: none; border:1px solid #ff8540; color: #ff8540; padding:4px 6px; font-size: 14px;float:right;margin-left:80px;margin-top:4px;}

</style>
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">

    <div id="mydiv" style="width: 650px">
   
        <form action="{:U('Order/zhifubao_upd')}" enctype="multipart/form-data" method="post" id="form">
          <input type="hidden" name="dengji" value="{$dengji}">
          <div style="margin-top: 50px">
            <span >
                 <span style="margin-left: 20px;margin-right: 5px;margin-top: 50px">等&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;级:</span>
                 <input type="text" value="{$da.dengji}" readonly="readonly" style="width: 60px;height: 14px"><br/>
				<span style="margin-left: 20px">开户银行:</span>
				<input type="text" name="yinhang" value="{$da.yinhang}"><br>
				<span style="margin-left: 20px">账户姓名:</span>
				<input type="text" name="name" class="name" style="margin-left: 5px;width: 100px;height: 16px" value="{$da.name}"><br/>
				<span style="margin-left: 20px">卡&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:</span>
				<input type="text" name="yinhangka" class="kahao1" style="margin-left: 5px;width: 170px;margin-right: 50px;height: 16px" value="{$da.number}"><br/>
				<span style="margin-left: 20px">确认卡号:</span>
				<input type="text" name="yinhangka" class="kahao2" style="margin-left: 5px;width: 170px;margin-right: 50px;height: 16px"placeholder="请再次输入卡号"><br/>
                <span style="margin-left: 20px">开户支行:</span>
				<input type="text" name="zhihang" class="zhihang" value="{$da.zhihang}" style="margin-left: 5px;width: 170px;margin-right: 50px;height: 16px"><br/>
                 <span style="margin-left: 20px">二维码图片:</span>
                 <input type="file" name="img1" class="img" style="margin-left: 5px;" id="im">
                 <div style="width: 80px;height:80px;margin-left: 100px;border: 1px solid black" id="img">
                    <img src="{$da.img}"  style="width: 80px;height: 80px;">
                 </div>
                 <input class="btn btn-danger" type="button" value="确认修改" onclick="sav()"  style="margin-left: 220px;margin-top: 100px">
            </span>
          </div>
        </form>

</div>
</div>
</body>
</html>


<script src="public/js/laydate/laydate.js"></script>

<script>
    function sav(){
        var name1 = $(".name").val();
        var name = name1.replace(/\s+/g,"");
        var zhanghao = $(".zhanghao").val();

        if(name == ''){
            alert("支付宝姓名不能为空");
            return false;
        }
        if(zhanghao == ''){
            alert("支付宝账户不能为空");
            return false;
        }
        // 账户姓名必须是汉字
        if(!/^[\u4e00-\u9fa5]+$/gi.test(name)){
            alert("支付宝姓名必须为汉字");
            return false
        }
        if(name.length>5 || name.length<2){
            alert("支付宝姓名在两个汉字-五个汉字之间");
            return false;
        }

        $("#form").submit();
    }

    $(function() {
        $('#im').change(function(e) {
            var file = e.target.files[0];
            img(file);
        })
    })
    function img(file) {
        var img = new Image(), url = img.src = URL.createObjectURL(file);
        var $img = $(img);
        img.onload = function() {
            URL.revokeObjectURL(url);
            $('#img').empty().append($img);
        }
    }
</script>